/**
 * Created by aperry on 27/06/2014.
 */
var addressDirective = angular.module('assetPlusApp.addressDirectives', []);

addressDirective.directive('cvAddressList', function () {
    return {
        restrict: 'E',
        scope: {
            addresses: '='
        },
        templateUrl: 'partials/address/addressList.html',
        link: function(scope, element, attrs){
            console.log('address_test', scope.addresses);
            scope.$watch('addresses', function(newValue, oldValue) {
                if (newValue)
                    console.log("I see a data change in address!");
            }, true);
        }
    }
});